Skip to content

Improve ZeroMQ ReqServer load-balancing#67215

Draft
jfindlay wants to merge 1 commit intosaltstack:masterfrom
jfindlay:mworker
Draft

Improve ZeroMQ ReqServer load-balancing#67215
jfindlay wants to merge 1 commit intosaltstack:masterfrom
jfindlay:mworker

Conversation

@jfindlay
Copy link
Contributor

@jfindlay jfindlay commented Feb 1, 2025

Salt currently uses a Broker socket to distribute incoming requests to MWorkers using a round-robin discipline, which doesn't take into account if the worker is already busy and will not be able to serve the request in a timely manner. This patch is based on the recommended ZMQ load-balancing pattern, which flips it to a Router socket that idle MWorkers will pull from. This resolves the SaltReqTimeout issues in testing and gets us better visibility into the utilization of workers.

What does this PR do?

What issues does this PR fix or reference?

Fixes

Previous Behavior

Remove this section if not relevant

New Behavior

Remove this section if not relevant

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.

See GitHub's page on GPG signing for more information about signing commits with GPG.

Salt currently uses a Broker socket to distribute incoming requests to
MWorkers using a round-robin discipline, which doesn't take into account
if the worker is already busy and will not be able to serve the request
in a timely manner. This patch is based on the recommended ZMQ
[load-balancing pattern](https://zguide.zeromq.org/docs/chapter3/#A-Load-Balancing-Message-Broker),
which flips it to a Router socket that idle MWorkers will pull from.
This resolves the SaltReqTimeout issues in testing and gets us better
visibility into the utilization of workers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants